/** @type {import('next').NextConfig} */
const nextConfig = {
    /*代理方式（1）*/
    async rewrites() {
        return {
            fallback: [
                //道理接口请求
                /*
                生产环境(Prod)：http://127.0.0.1:9091 (代理:http://38.246.250.83:9091)
                开发环境(Dev)：http://127.0.0.1:9091 (代理:https://localhost:9091)
                 */
                { source: '/:path*', destination: `http://38.246.250.83:9091/:path*` },
            ]
        }
    },
    /*打包方式*/
    output: 'standalone',
    /*构建ID*/
    generateBuildId: async () => {
        return (process.env.VERSION || Date.now() + Math.round(Math.random() * 2441139)).toString()
    },
    reactStrictMode: false, //关闭Strict模式
    eslint: {
        // 警告：这允许即使项目中有ESLint错误，生产构建也能成功完成
        ignoreDuringBuilds: true,
    },
    typescript: {
        // !! WARN !!
        // Dangerously allow production builds to successfully complete even if
        // your project has type errors.
        // !! WARN !!
        ignoreBuildErrors: true,
    },
}
module.exports = nextConfig
